package com.myspace.backend.controller.user;

import com.myspace.backend.service.user.UserFollowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class UserFollowController {

    @Autowired
    private UserFollowService userFollowService;

    @PostMapping("/myspace/user/follow/")
    public Map<String, String> userFollow(@RequestParam Map<String, String> map) {
        String targetId = map.get("target_id");
        return userFollowService.userFollow(targetId);
    }

}
